<?php
namespace haibao\cms\business\control\wap\common;

class FooterController extends \haibao\cms\business\control\Base{

	public function __construct($updateTime = null,$controlId,$isPublish){
		parent::__construct($updateTime,$controlId,$isPublish);
	}
	
	public function displayTemplateHtml(){
		$controlData = $this->getParameter(self::$CONTROL_DATA);
		$content = $this->getParameter(self::$CONTROL_CONTENT);
		$path = $this->generateHtmlPath(__CLASS__);
		$footNav = '';
		$channel = '';
		
		if(isset($controlData['manual']['footNav'])){
			$footNav = $controlData['manual']['footNav'];
		}
		if(isset($controlData['manual']['channel'])){
			$channel = $controlData['manual']['channel'];
		}
		
		$arrayMenu = array(
				'/'=>'首页',
				'fashion'=>'时装',
				'star'=>'明星',
				'beauty'=>'美容',
				'brand'=>'品牌',
				'jewelrywatch'=>'珠宝腕表',
				'accessory'=>'配饰',
				'life'=>'生活',
				'wedding'=>'新娘',
				'tv'=>'美剧',
				'v/'=>'视频'
		);
		if($channel){
			unset($arrayMenu[$channel]);
		}
		$arrayMenuTop = array_slice($arrayMenu, 0,5);
		$arrayMenuFoot = array_slice($arrayMenu, 5);
		$currentArrayFoot = current($arrayMenuFoot);
		
		$this->assign('footNav', $footNav);
		$this->assign('currentArrayFoot', $currentArrayFoot);
		$this->assign('arrayMenuTop',$arrayMenuTop);
		$this->assign('arrayMenuFoot',$arrayMenuFoot);

		$this->generateHtml($path,$content);
		
		
		return  $this->getHtml($path);
	}

}